Release 10.1A: OpenEdge Development:
Web Services
Simple data types
Simple data types represent the foundation for all types of data. The mappings for simple data types and how they can be transformed between Web services and the Progress 4GL provide the basic information for how to work with more complex types of data.
Suggested mappings
OpenEdge suggests recommended mappings between Web service parameters and Progress 4GL parameters in the generated documentation produced by the WSDL Analyzer. These are the mappings that are most semantically useful. Note also that wherever the WSDL file indicates that a parameter of any data type is
nillable, this means that on the Web service side the parameter can have the null value and on the Progress 4GL side the parameter can pass the 4GL Unknown value (?).Table 8–9 lists all the simple XML Schema data types in alphabetical order, showing for each one the Progress 4GL data type that OpenEdge suggests for mapping it. The table also provides notes on these mappings where appropriate.
Interacting with XML Schema data formats
You might need to work directly with an XML Schema value whose format is not represented among the supported formats for the suggested Progress 4GL data type mapping, for example, a 51-digit decimal value. To handle this requirement, you can pass an XML Schema-formatted string version of the value into or out of the Web service invocation. OpenEdge automatically passes the XML Schema-formatted value when you map either a
CHARACTERorLONGCHARdata type to any XML Schema data type that has a suggested mapping (see Table 8–9) other thanCHARACTERorLONGCHAR.When you pass the XML Schema-formatted value as an
INPUTparameter, the Web service invocation incorporates it directly into the generated SOAP message. For anOUTPUTparameter, the invocation copies the XML Schema-formatted value directly from the SOAP message into theCHARACTERorLONGCHARparameter.When you pass an XML Schema-formatted value to a Web service, the invocation also validates the format of the value to ensure that it conforms to XML Schema formatting rules for the data type. Note that the invocation does not validate any facets declared in the
<schema>element to constrain the value. It ensures that the format of the value you provide is valid according to its base XML Schema data type representation, but not, for example, if the value falls within a given range.Thus, for example, if you pass a Progress 4GL
CHARACTERas anINPUTparameter for an XML Schemaint, the invocation checks to ensure that it contains a properly formatted 32-bit integer value. If you pass a Progress 4GLCHARACTERas anOUTPUTparameter for an XML Schemaint, the invocation copies the Schema-formatted value directly from the SOAP message into the 4GLCHARACTERparameter.Data type casting
As described previously, OpenEdge supports a set of alternative Progress 4GL data types (in addition to a suggested data type) to represent the value for an XML Schema data type in the Progress 4GL. These alternative data types essentially force the Web service invocation to cast the value between the specified native Progress 4GL representation and the corresponding XML Schema data type. The result of this casting might not preserve as much accuracy as the suggested mapping.
Table 8–10 shows all the supported castings (alternative mappings) between the XML Schema and Progress 4GL data types. The suggested Progress 4GL data type mapping (see Table 8–9) for each XML Schema type appears in bold font. For a detailed description of how OpenEdge casts each supported mapping, see Appendix D "Data Type Casting Rules for Progress 4GL Calls to Web Services."
Note: OpenEdge supports no castings for theRECID,ROWID, orHANDLE4GL data types.
Table 8–10: Supported casts between XML Schema and Progress 4GL
data types XML Schema data type Progress 4GL data type
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |